<div class="container">
    <div class="row row-gap-3 column-gap-md-5">
        <div class="col-lg-2">
            <a class="mb-4 icon-link icon-link-hover link-light link-opacity-50 link-opacity-75-hover link-underline-opacity-0" href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">
                <svg class="bi" width="16" height="16"><title>GitHub</title><use href="#bi-github"></use></svg>
                <span class="fs-5 text-nowrap">{{ .Site.Title }}</span>
            </a>
            <ul class="list-unstyled text-nowrap">
            {{ range index .Site.Data.footerLogo.description .Language.LanguageCode }}
                <li class="mb-3 link-light link-opacity-50-hover link-underline-opacity-0">{{ . }}</li>
            {{ end }}
            </ul>
            {{ if eq .Language.LanguageCode "zh-CN" }}
            <ul class="list-unstyled text-nowrap" id="beian">
            {{- with .Site.Data.beian.icp }}
            {{ $title := .title }}
            {{ $href := .url }}
                <li class="mb-3">
                    <a class="link-light link-opacity-25-hover link-underline-opacity-0" id="icp" href="{{ $href }}" target="_blank" rel="noreferrer" title="{{ $title }}">{{- .number -}}</a>
                </li>
            {{- end -}}
            {{- with .Site.Data.beian.publicSecurity }}
            {{ $title := .title }}
            {{ $href := printf "%s?code=%s" .url .number }}
                <li class="mb-3">
                    <a class="link-light link-opacity-25-hover link-underline-opacity-0" id="gongan" href="{{ $href }}" target="_blank" rel="noreferrer" title="{{ $title }}">{{- .number -}}</a>
                </li>
            {{- end -}}
            </ul>
            {{ end }}
        </div>
        <div class="col-lg row row-gap-4 column-gap-md-5">
        {{- $currentPage := .RelPermalink -}}
        {{- $defaultLangCode := "zh-CN" -}}
        {{- $currentLangCode := .Language.LanguageCode -}}

        {{- range .Site.Data.footerLinks -}}
        {{- $label := index .category.label $currentLangCode -}}
            <div class="col-6 col-md">
                <h6 class="mb-4 text-nowrap fw-bolder">{{ $label }}</h6>
                <ul class="list-unstyled">
                {{- range .category.group -}}

                {{- $onclick := "" -}}
                {{- with .onclick -}}
                    {{ $onclick = printf "onclick=%s" . }}
                {{- end -}}

                {{- $name := index .name $currentLangCode -}}

                {{ $href := printf "href=%s%s" (.url | relLangURL) "/" }}
                {{ with .onclick}}
                    {{ $href = "href=javascript:" }}
                {{ end }}

                {{- if eq $currentPage $href -}}
                    <li class="mb-3"><a class="text-nowrap link-light link-opacity-25-hover link-underline-opacity-10 link-offset-3 fw-bolder" {{ $href | safeHTMLAttr }} {{ $onclick | safeHTMLAttr }} title="{{ $name }}">{{ $name }}</a></li>
                {{- else -}}
                    <li class="mb-3"><a class="text-nowrap link-light link-opacity-25-hover link-underline-opacity-0" {{ $href | safeHTMLAttr }} {{ $onclick | safeHTMLAttr }} title="{{ $name }}">{{ $name }}</a></li>
                {{- end -}}
                {{- end -}}
                </ul>
            </div>
        {{- end -}}
        </div>
    </div>
</div>